package com.woniu.supermarket.service.impl;

import com.woniu.supermarket.mapper.PurchaseDetailMapper;
import com.woniu.supermarket.mapper.WarehousingDetailMapper;
import com.woniu.supermarket.service.IPurchaseDetailService;
import com.woniu.supermarket.service.IWarehousingDetailService;
import com.woniu.supermarket.vo.PurchaseDetailVo;
import com.woniu.supermarket.vo.WarehousingDetailVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WarehousingDetailServiceImpl implements IWarehousingDetailService {


    @Autowired
    WarehousingDetailMapper warehousingDetailMapper;

    @Override
    public List<WarehousingDetailVo> findAllWarehousingDetailByWarehousingId(Integer id) {
        return warehousingDetailMapper.selectAllWarehousingDetailByWarehousingId(id);
    }


    /**
     * 根据采购单编号查询采购单详情
     * @param warehousingNumber 采购单编号
     * @return
     */
    @Override
    public List<WarehousingDetailVo>  findAllWarehousingDetailByWarehousingNumber(String warehousingNumber) {
        return warehousingDetailMapper.selectAllWarehousingDetailByWarehousingNumber(warehousingNumber);
    }
}
